package com.iss.demo.service;

import com.iss.demo.dao.OrderDao;
import com.iss.demo.entity.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderService {

    @Autowired
    private OrderDao dao;
    public List<Order> selectAll(){return dao.selectAll();}

    public List<Order> selectAllById(Integer u_id){
        return dao.selectAllById(u_id);
    }

    public Integer insertOrder(Order order){
        return dao.insertOrder(order);
    }

    public Integer deleteOne(Integer o_id){
        return dao.deleteOne(o_id);
    }

    public Integer update(Integer o_id){return dao.updateShopCar(o_id);}
}
